package edu.langnan.xiaoli.service.impl;

import edu.langnan.xiaoli.core.domain.CommentDO;
import edu.langnan.xiaoli.core.dto.CommentDTO;
import edu.langnan.xiaoli.mapper.CommentMapper;
import edu.langnan.xiaoli.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author cql
 */
@Service
public class CommentServiceImpl implements CommentService {

    @Autowired
    private CommentMapper commentMapper;

    @Override
    public List<CommentDTO> findCommentList(Integer typeId, String type) {
        return commentMapper.findCommentList(typeId, type);
    }

    @Override
    public void insertComment(CommentDO commentDO) {
        commentMapper.insert(commentDO);
    }
}
